package dshop.service;

import java.math.BigDecimal;

import dshop.model.commission.Commission;
import dshop.model.commission.CommissionDetail;

public class CommissionService {

	public static void onDrawSuccess(int drawId, BigDecimal money) {
		String descs = "积分提现：-" + money.toString();
		CommissionDetail.modifyDesc(descs, drawId, Commission.CHANGE_TYPE_DRAW_CASH);
	}

	public static void onDrawFail(int userId, int drawId, BigDecimal money) {
		String descs = "提现失败，返还积分：+ " + money.toString();
		Commission.onPlus(userId, money, descs, Commission.CHANGE_TYPE_DRAW_CASH_FAIL_RETURN, drawId);
	}

}
